<template>
    <div class="karry-container">
        <h1>名人动态</h1>
        <button class="login-btn" @click="goToLogin">返回登录页</button>
        <button class="login-btn" @click="clearLocalStorage">清除本地储存</button>
    </div>
</template>

<script>
export default{
    methods:{
        goToLogin(){
            this.$router.push('/login');
        },
        clearLocalStorage(){
            localStorage.clear();
            alert('清除成功');
        }
    }
}
// 清除本地储存

</script>

<style scoped>
h1 {
    color: #2c3e50; /* 深色文字，与蓝色搭配 */
}

.karry-container {
    padding: 20px;
}

.login-btn {
    background-color: #0056b3;
    color: white;
    border: none;
    padding: 10px 20px;
    margin-top: 20px;
    border-radius: 5px;
    cursor: pointer;
}

.login-btn:hover {
    background-color: #003d82;
}
</style>